package com.zhc.dejingapi.pojo.qingflow;

import lombok.Data;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

@Data
@Component
public class QingflowApiInfo {
    //    @Value("${spring.fwoae9.setinfo466.invcodestart}")
    //    private String invCodeStart;
    //    @Value("${spring.fwoae9.setinfo466.invcodeinclude}")
    //    private String invCodeInclude;

    //    serverurl: "http://39.185.158.205:1080/"
    @Value("${spring.qinglfowapi.serverurl}")
    private String serverUrl;
    //    baseurl: "openApi/"
    @Value("${spring.qinglfowapi.baseurl}")
    private String baseUrl;
    //    wsid: "tAeLHd46LCLbwA7N9zytWw=="
    @Value("${spring.qinglfowapi.wsid}")
    private String wsId;
    //    wssecret: "bceb7be9-ecdc-4320-b323-e683ede78455"
    @Value("${spring.qinglfowapi.wssecret}")
    private String wsSecret;
    //    supperaccesstoken: "59d96acf-850d-49f7-9a0c-d65db32b6034"
    @Value("${spring.qinglfowapi.supperaccesstoken}")
    private String supperAccesstoken;
    //    userid: "2052632"
    @Value("${spring.qinglfowapi.userid}")
    private String userId;
    //    useremail: "77722675@qq.com"
    @Value("${spring.qinglfowapi.useremail}")
    private String userEmail;
    //    userareacode: ""
    @Value("${spring.qinglfowapi.userareacode}")
    private String userAreacode;
    //    usermobile: ""
    @Value("${spring.qinglfowapi.usermobile}")
    private String userMobile;

    @Value("${spring.qinglfowapi.userpassword}")
    private String userPassWord;

    @Value("${spring.qinglfowapi.tokenSource}")
    private String tokenSource;
    public String FetchUrl()
    {
        String url = serverUrl;
        if (!url.endsWith("/"))
        {
            url += "/";
        }
        url += baseUrl;
        if (!url.endsWith("/"))
        {
            url += "/";
        }
        return url;
    }
}
